package cn.fiker.BeautyPic;

import java.util.Calendar;
import java.util.Date;
import java.text.SimpleDateFormat;

public class SysDate {

	private static int time;
	private static int date;
	private static Date dateTime;
	private static SimpleDateFormat sdf;

	public SysDate() {
		dateTime = now();
	}

	public static Date now() {
		Calendar cale = Calendar.getInstance();
		dateTime = cale.getTime();
		return dateTime;
	}

	public static int getDate() {
		return date;
	}

	public static int getTime() {
		return time;
	}

	public static String getDateString() {
		sdf = new SimpleDateFormat("yyyy-MM-dd");
		return sdf.format(now());
	}

	public static String getTimeString() {
		sdf = new SimpleDateFormat("HH:mm:ss");
		return sdf.format(now());
	}

	public String getString() {
		return getDateString() + " " + getTimeString();
	}

	public static long getTimeStemp() {
		Calendar cale = Calendar.getInstance();
		return (long) cale.getTimeInMillis()/1000;
	}

}
